﻿'Digite o NameSpace: Financeiro
'Digite o nome da Classe de dominio: AReceber

'--TESTE:-----------
'    <TestMethod()> _
'    Public Sub SalvarAReceber()
'        Dim _AReceber As AReceber
'        _AReceber = New AReceber
'
'        _AReceber.Salvar()
'
'        Assert.IsTrue(_AReceber.Id.HasValue)
'    End Sub
<Serializable()> _
Public Class AReceber
    Inherits BaseDominio

#Region "Negocio"

    Public Sub New()
        MyBase.New()
    End Sub

    Public Overridable Function Buscar(ByVal _id As Long) As AReceber
        Return MyBase.AReceberDao.Buscar(_id)
    End Function

    Public Overridable Sub Salvar()
        MyBase.AReceberDao.Salvar(Me)
    End Sub

    Public Overridable Function SimularParcelasPorNumeroDeParcelas(ByVal _valorPresente As Decimal, ByVal _taxaJuros As Decimal, ByVal _numeroParcelas As Integer) As IList(Of Parcela)

        If _numeroParcelas = 0 Then Throw New Exception

        Throw New NotImplementedException
    End Function

    Public Overridable Function SimularParcelasPorValorParcela(ByVal _valorPresente As Decimal, ByVal _taxaJuros As Decimal, ByVal _valorParcela As Decimal) As IList(Of Parcela)

        If _valorParcela > _valorPresente Then Throw New Exception
        If _valorParcela = 0 Then Throw New Exception

        Throw New NotImplementedException
    End Function

    Public Overridable Function SalvarPorValorParcela(ByVal _valorPresente As Decimal, ByVal _taxaJuros As Decimal, ByVal _valorParcela As Decimal)
        Throw New NotImplementedException
    End Function

    Public Overridable Function SalvarPorNumeroParcelas(ByVal _valorPresente As Decimal, ByVal _taxaJuros As Decimal, ByVal _numeroParcelas As Integer)
        Throw New NotImplementedException
    End Function

#End Region

End Class
